Remote interface to logical instruments

ABSTRACT

System and method for controlling a custom modular measurement system. An editor may receive user input specifying one or more system definitions, each mapping message based commands, parameters, variables and/or metadata (“information”) accordant with a control protocol for standalone instruments to functions and data in a programming language, and generates the definitions accordingly, each being useable by a client application to interface with a custom modular measurement system that includes multiple logical instruments via the message based information. At least one of the definitions may be deployed onto the measurement system. A run-time engine of the measurement system may accept a message based command from the application, and call a corresponding function, which may invoke operation of at least one of the logical instruments. The logical instruments may be operated concurrently, including sharing use of a single physical measurement device by at least two of the logical instruments.

FIELD OF THE INVENTION

The present disclosure relates to the field of instrumentation, and moreparticularly to logical instrumentation, specifically, a remoteinterface to logical instruments, and a device for implementing logicalinstrumentation.

DESCRIPTION OF THE RELATED ART

Developers of automated test systems often want to implement adistributed architecture where a custom modular measurement system isphysically separated from an automated test control system but coupledvia a network. Typical modular measurement systems consist of one ormore measurement devices and associated software drivers, an embeddedcontroller/processor, and a software run-time system to call andcoordinate the drivers for the measurement devices, sometimesconcurrently. Typical automated test control systems consist of a hostcomputer running a software program that sends commands to the modularmeasurement system and receives and then processes the results.

Such modular measurement systems need a mechanism to export an interfacethat can be invoked over a network. One approach is to provide a controlprotocol for standalone instruments such as SCPI (Standard Commands forProgrammable Instruments) interface. SCPI is a popular standard forcommunicating with and controlling measurement devices which definesstandard instrument commands transmitted as ASCII string over acommunication bus.

In a typical prior art automated system as described above, the SCPIinterface would necessarily be custom, i.e., would requirecustomization. However, it is very difficult to create a custom SCPIinterface to a custom modular measurement system.

Additionally, in current automated test systems the ratio betweenautomated test stations and measurement equipment is 1:1. The usage ofan individual instrument is often below 50% which means that the highvalue asset of the instrument is used less than half the time. Oneapproach to increase the utilization of such assets is to share theinstrument between different testers, e.g., host computers executingtesting software, such as in a test executive application or system.Many test systems utilize a control protocol for standalone instrumentsto communicate with and control instruments, e.g., SCPI; however,sharing a SCPI based instrument is no trivial task as SCPI commands bydefinition are or include stateful data, where the total configurationis performed in small pieces at a time. This means that if theinstrument is shared between two testers A and B, the commands of testerA can conflict with settings used by tester B and vice versa.

As illustrated in prior art FIG. 1, locking the instrument, e.g., usingVirtual Instrument Software Architecture (VISA) locks, as provided byNational Instruments Corporation, allows tester A to complete Configure,Measure (e.g., Acquire and Process), and Result Readback phases oftesting before tester B can acquire the lock and lock out tester A. AsFIG. 1 shows, Tester A locks the device, thus limiting the device toTester A's use, including the Configure, Measure, and Readback phases oftesting, during which Tester B is blocked from using the device. Asshown, once Tester A's testing is done, Tester A unlocks the device, andTester B locks the device, thus limiting the device to Tester B's use,including the Configure, Measure, and Readback phases of testing, duringwhich Tester A is blocked from using the device. Upon completion ofTester B's testing, Tester B may unlock the device.

This approach, however, is quite inefficient as the instrument hardwareis locked from the time the first Configure phase command is sent untilthe last result Readback command is received. Ideally, the only time theinstrument hardware actually needs to be locked and blocking any otherprocesses is during the Measure phase.

Graphical programming has become a powerful tool available toprogrammers. Graphical programming environments such as the NationalInstruments LabVIEW product have become very popular. Tools such asLabVIEW have greatly increased the productivity of programmers, andincreasing numbers of programmers are using graphical programmingenvironments to develop their software applications. In particular,graphical programming tools are being used for test and measurement,data acquisition, process control, man machine interface (MMI),supervisory control and data acquisition (SCADA) applications, modeling,simulation, image processing/machine vision applications, and motioncontrol, among others.

SUMMARY OF THE INVENTION

Various embodiments of systems and methods for logical instrumentationare presented below. A system configured according to embodiments of thetechniques disclosed herein may include a client application, and acustom modular measurement system, coupled to the client application.The custom modular measurement system may include a controller,including: one or more system definitions, where each system definitionmaps message based commands, parameters, variables, and/or metadataaccordant with a control protocol for standalone instruments tofunctions and data in a programming language, and a run-time engine. Thecustom modular measurement system may further include a plurality oflogical instruments, coupled to or comprised in the controller, wherethe client application may be configured to send one or more messagebased commands, parameters, variables, and/or metadata accordant withthe control protocol to the custom modular measurement system. Therun-time engine may be configured to: accept a message based commandfrom the client application, call a function that corresponds to themessage based command, based on at least one of the one or more systemdefinitions, and perform said accepting and said calling a plurality oftimes, where at least one called function invokes operation of at leastone of the logical instruments.

In one embodiment, a method for controlling a custom modular measurementsystem may include receiving, by an editor, user input specifying one ormore system definitions, where each system definition maps message basedcommands, parameters, variables and/or metadata accordant with a controlprotocol for standalone instruments to functions and data in aprogramming language. The editor may generate the one or more systemdefinitions based on the user input, where each system definition isuseable by a client application to interface with a custom modularmeasurement system that includes multiple logical instruments via themessage based commands, parameters, variables, and/or metadata. At leastone of the system definitions may be deployed onto the custom modularmeasurement system. A run-time engine of the custom modular measurementsystem may accept a message based command from the client application,and may call a function that corresponds to the message based command,based on the at least one of the one or more system definitions. Therun-time engine may perform said accepting and said calling a pluralityof times, where at least one called function invokes operation of atleast one of the logical instruments.

The method may further include the editor displaying and editing one ormore functions in the programming language. In one embodiment, themethod may include the editor displaying and editing at least one of thesystem definitions in response to user input. Moreover, the editor maycreate a tree of the message based commands organized in accordance withthe logical instruments and measurement subsystems of the logicalinstruments. In one embodiment, the editor may create an integratedinstrument soft front panel, where the integrated instrument soft frontpanel includes respective subpanels for logical instruments and/ormeasurement subsystems of the logical instruments, and where theintegrated instrument soft front panel maps elements on the panels tothe functions, parameters, variables, and/or metadata in the programminglanguage. In some embodiments, the method may include parsing, by therun-time engine, the message based command, and determining the functionbased on the parsing. The above function calling may be performed inresponse to such determining.

Each logical instrument may represent a single physical measurementdevice, multiple coordinated physical measurement devices, or software,as desired. Additionally, during operation, at least two of the logicalinstruments may share use of a single physical measurement device. Inone embodiment, at least one logical instrument may support concurrentexecution of multiple independent measurement subsystems. The run-timeengine may support multiple concurrent external connections to the samelogical instrument.

The method may further include synchronizing, by the run-time engine,access to a physical measurement device by multiple logical instruments,or multiple measurement subsystems within a logical instrument. In oneembodiment, a message containing a result of the operation may be sentto the client application.

Note that the control protocol for standalone instruments may be of anytype desired. In one embodiment, the control protocol for standaloneinstruments may be or include SCPI (Standard Commands for ProgrammableInstruments). In some embodiments, the programming language may includea graphical programming language, e.g., a graphical data flowprogramming language, such as LabVIEW™.

In some embodiments a system may be provided that includes or supportsmultiple logical instruments. For example, in one embodiment, the systemmay include a processor, and a memory, coupled to the processor, wherethe memory stores program instructions executable by the processor toimplement: a plurality of logical instruments, where each logicalinstrument is configured to perform measurement functions via at leastone corresponding physical measurement device, a plurality of isolatedmemory spaces in the memory, where each isolated memory space isconfigured to store configuration information and working data for arespective logical instrument, and at least one measurement engine.

The plurality of logical instruments may be configured to operateconcurrently, where each of the plurality of logical instruments mayconfigured to communicate with a respective client applicationindependently, and acquire, generate, or process data using the at leastone corresponding physical measurement device via the at least onemeasurement engine per the configuration information. During operation,at least two of the logical instruments may share use of a singlephysical measurement device.

In some embodiments, use of a single physical measurement device by alogical instrument may include operating the single physical measurementdevice in a plurality of phases, including at least one phase thatincludes an exclusive portion that requires exclusive access to thesingle physical measurement device, in which case sharing may includelocking, by a first logical instrument of the at least two logicalinstruments, the single physical measurement device for duration of theexclusive portion of the at least one phase, thereby blocking others ofthe at least two logical instruments from using the single physicalmeasurement device for the duration of the exclusive portion of the atleast one phase, and unlocking, by the first logical instrument of theat least two logical instruments, the single physical measurement devicewhen the exclusive portion of the at least one phase completes, therebyallowing use of the single physical measurement device by the others ofthe at least two logical instruments.

In one embodiment, the exclusive portion of the at least one phase mayinclude an acquire portion in which data are acquired via thecorresponding single physical measurement device. In another embodiment,the exclusive portion of the at least one phase may include a generateportion in which signals are generated via the corresponding singlephysical measurement device.

In some embodiments, the at least one measurement engine may be orinclude a plurality of measurement engines. The plurality of measurementengines may be configured to operate concurrently. Thus, the method mayinclude operating the plurality of measurement engines concurrently.

The above locking and unlocking the single physical measurement devicemay be performed via a mechanism implemented in the at least onemeasurement engine. For example, the mechanism may be implemented in theat least one measurement engine using operating system (OS) features,such as, for example, one or more of: one or more semaphores, or atleast one mutex. In one embodiment, the mechanism may be implemented inthe at least one measurement engine using virtual instrument softwarearchitecture (VISA) locks. In some embodiments, the locking or unlockingmay include putting threads to sleep, and/or disabling OS interrupts.

In various embodiments, at least one logical instrument of the pluralityof logical instruments is configured to provide measurementcapabilities, and analysis functionality implemented in software, wherethe analysis functionality operates on data obtained from the at leastone corresponding physical measurement device.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description of the preferred embodiment is consideredin conjunction with the following drawings, in which:

FIG. 1 illustrates device locking for multi-testing using a modularmeasurement device, according to the prior art;

FIG. 2A illustrates a computer system configured to implementembodiments of the present invention;

FIG. 2B illustrates a network system comprising two or more computersystems configured to implement embodiments of the present invention;

FIG. 2C illustrates a distributed measurement system, according to oneexemplary embodiment of the invention;

FIG. 3A illustrates an instrumentation control system according to oneembodiment of the invention;

FIG. 3B illustrates an industrial automation system according to oneembodiment of the invention;

FIG. 4A is a high level block diagram of an exemplary system which mayexecute or utilize graphical programs;

FIG. 4B illustrates an exemplary system which may perform control and/orsimulation functions utilizing graphical programs;

FIG. 5 is an exemplary block diagram of the computer systems of FIGS.2A, 2B, 3A and 3B and 4B;

FIG. 6 is a flowchart diagram illustrating one embodiment of a methodfor interfacing with logical instruments;

FIG. 7 illustrates an exemplary edit time work flow, according to oneembodiment;

FIG. 8 illustrates an exemplary hierarchical command set definition,according to one embodiment;

FIG. 9 illustrates an exemplary run time work flow, according to oneembodiment;

FIG. 10 is a high level block diagram of an exemplary system of logicalinstruments, according to one embodiment;

FIG. 11 illustrates an exemplary internal architecture of an exemplarysystem of logical instruments and shared hardware, according to oneembodiment;

FIG. 12 illustrates sharing of a physical instrument, according to oneembodiment; and

FIG. 13 is a flowchart diagram illustrating one embodiment of a methodfor operating logical instruments.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and are herein described in detail. It should beunderstood, however, that the drawings and detailed description theretoare not intended to limit the invention to the particular formdisclosed, but on the contrary, the intention is to cover allmodifications, equivalents and alternatives falling within the spiritand scope of the present invention as defined by the appended claims.

DETAILED DESCRIPTION OF THE INVENTION Incorporation by Reference

The following references are hereby incorporated by reference in theirentirety as though fully and completely set forth herein:

-   U.S. Pat. No. 4,914,568 titled “Graphical System for Modeling a    Process and Associated Method,” issued on Apr. 3, 1990.-   U.S. Pat. No. 5,481,741 titled “Method and Apparatus for Providing    Attribute Nodes in a Graphical Data Flow Environment”.-   U.S. Pat. No. 6,173,438 titled “Embedded Graphical Programming    System” filed Aug. 18, 1997.-   U.S. Pat. No. 6,219,628 titled “System and Method for Configuring an    Instrument to Perform Measurement Functions Utilizing Conversion of    Graphical Programs into Hardware Implementations,” filed Aug. 18,    1997.-   U.S. Pat. No. 7,210,117 titled “System and Method for    Programmatically Generating a Graphical Program in Response to    Program Information,” filed Dec. 20, 2000.

Terms

The following is a glossary of terms used in the present application:

Memory Medium—Any of various types of non-transitory computer accessiblememory devices or storage devices. The term “memory medium” is intendedto include an installation medium, e.g., a CD-ROM, floppy disks 104, ortape device; a computer system memory or random access memory such asDRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; a non-volatile memorysuch as a Flash, magnetic media, e.g., a hard drive, or optical storage;registers, or other similar types of memory elements, etc. The memorymedium may comprise other types of non-transitory memory as well orcombinations thereof. In addition, the memory medium may be located in afirst computer in which the programs are executed, or may be located ina second different computer which connects to the first computer over anetwork, such as the Internet. In the latter instance, the secondcomputer may provide program instructions to the first computer forexecution. The term “memory medium” may include two or more memorymediums which may reside in different locations, e.g., in differentcomputers that are connected over a network.

Carrier Medium—a memory medium as described above, as well as a physicaltransmission medium, such as a bus, network, and/or other physicaltransmission medium that conveys signals such as electrical,electromagnetic, or digital signals.

Programmable Hardware Element—includes various hardware devicescomprising multiple programmable function blocks connected via aprogrammable interconnect. Examples include FPGAs (Field ProgrammableGate Arrays), PLDs (Programmable Logic Devices), FPOAs (FieldProgrammable Object Arrays), and CPLDs (Complex PLDs). The programmablefunction blocks may range from fine grained (combinatorial logic or lookup tables) to coarse grained (arithmetic logic units or processorcores). A programmable hardware element may also be referred to as“reconfigurable logic”.

Software Program—the term “software program” is intended to have thefull breadth of its ordinary meaning, and includes any type of programinstructions, code, script and/or data, or combinations thereof, thatmay be stored in a memory medium and executed by a processor. Exemplarysoftware programs include programs written in text-based programminglanguages, such as C, C++, PASCAL, FORTRAN, COBOL, JAVA, assemblylanguage, etc.; graphical programs (programs written in graphicalprogramming languages); assembly language programs; programs that havebeen compiled to machine language; scripts; and other types ofexecutable software. A software program may comprise two or moresoftware programs that interoperate in some manner. Note that variousembodiments described herein may be implemented by a computer orsoftware program. A software program may be stored as programinstructions on a memory medium.

Hardware Configuration Program—a program, e.g., a netlist or bit file,that can be used to program or configure a programmable hardwareelement.

Program—the term “program” is intended to have the full breadth of itsordinary meaning. The term “program” includes 1) a software programwhich may be stored in a memory and is executable by a processor or 2) ahardware configuration program useable for configuring a programmablehardware element.

Graphical Program—A program comprising a plurality of interconnectednodes or icons, wherein the plurality of interconnected nodes or iconsvisually indicate functionality of the program. The interconnected nodesor icons are graphical source code for the program. Graphical functionnodes may also be referred to as blocks.

The following provides examples of various aspects of graphicalprograms. The following examples and discussion are not intended tolimit the above definition of graphical program, but rather provideexamples of what the term “graphical program” encompasses:

The nodes in a graphical program may be connected in one or more of adata flow, control flow, and/or execution flow format. The nodes mayalso be connected in a “signal flow” format, which is a subset of dataflow.

Exemplary graphical program development environments which may be usedto create graphical programs include LabVIEW®, DasyLab™, DIADem™ andMatrixx/SystemBuild™ from National Instruments, Simulink® from theMathWorks, VEE™ from Agilent, WiT™ from Coreco, Vision Program Manager™from PPT Vision, SoftWIRE™ from Measurement Computing, Sanscript™ fromNorthwoods Software, Khoros™ from Khoral Research, SnapMaster™ from HEMData, VisSim™ from Visual Solutions, ObjectBench™ by SES (Scientific andEngineering Software), and VisiDAQ™ from Advantech, among others.

The term “graphical program” includes models or block diagrams createdin graphical modeling environments, wherein the model or block diagramcomprises interconnected blocks (i.e., nodes) or icons that visuallyindicate operation of the model or block diagram; exemplary graphicalmodeling environments include Simulink®, SystemBuild™, VisSim™,Hypersignal Block Diagram™, etc.

A graphical program may be represented in the memory of the computersystem as data structures and/or program instructions. The graphicalprogram, e.g., these data structures and/or program instructions, may becompiled or interpreted to produce machine language that accomplishesthe desired method or process as shown in the graphical program.

Input data to a graphical program may be received from any of varioussources, such as from a device, unit under test, a process beingmeasured or controlled, another computer program, a database, or from afile. Also, a user may input data to a graphical program or virtualinstrument using a graphical user interface, e.g., a front panel.

A graphical program may optionally have a GUI associated with thegraphical program. In this case, the plurality of interconnected blocksor nodes are often referred to as the block diagram portion of thegraphical program.

Node—In the context of a graphical program, an element that may beincluded in a graphical program. The graphical program nodes (or simplynodes) in a graphical program may also be referred to as blocks. A nodemay have an associated icon that represents the node in the graphicalprogram, as well as underlying code and/or data that implementsfunctionality of the node. Exemplary nodes (or blocks) include functionnodes, sub-program nodes, terminal nodes, structure nodes, etc. Nodesmay be connected together in a graphical program by connection icons orwires.

Data Flow Program—A Software Program in which the program architectureis that of a directed graph specifying the flow of data through theprogram, and thus functions execute whenever the necessary input dataare available. Said another way, data flow programs execute according toa data flow model of computation under which program functions arescheduled for execution in response to their necessary input databecoming available. Data flow programs can be contrasted with proceduralprograms, which specify an execution flow of computations to beperformed. As used herein “data flow” or “data flow programs” refer to“dynamically-scheduled data flow” and/or “statically-defined data flow”.

Graphical Data Flow Program (or Graphical Data Flow Diagram)—A GraphicalProgram which is also a Data Flow Program. A Graphical Data Flow Programcomprises a plurality of interconnected nodes (blocks), wherein at leasta subset of the connections among the nodes visually indicate that dataproduced by one node is used by another node. A LabVIEW VI is oneexample of a graphical data flow program. A Simulink block diagram isanother example of a graphical data flow program.

Graphical User Interface—this term is intended to have the full breadthof its ordinary meaning. The term “Graphical User Interface” is oftenabbreviated to “GUI”. A GUI may comprise only one or more input GUIelements, only one or more output GUI elements, or both input and outputGUI elements.

The following provides examples of various aspects of GUIs. Thefollowing examples and discussion are not intended to limit the ordinarymeaning of GUI, but rather provide examples of what the term “graphicaluser interface” encompasses:

A GUI may comprise a single window having one or more GUI Elements, ormay comprise a plurality of individual GUI Elements (or individualwindows each having one or more GUI Elements), wherein the individualGUI Elements or windows may optionally be tiled together.

A GUI may be associated with a graphical program. In this instance,various mechanisms may be used to connect GUI Elements in the GUI withnodes in the graphical program. For example, when Input Controls andOutput Indicators are created in the GUI, corresponding nodes (e.g.,terminals) may be automatically created in the graphical program orblock diagram. Alternatively, the user can place terminal nodes in theblock diagram which may cause the display of corresponding GUI Elementsfront panel objects in the GUI, either at edit time or later at runtime. As another example, the GUI may comprise GUI Elements embedded inthe block diagram portion of the graphical program.

Front Panel—A Graphical User Interface that includes input controls andoutput indicators, and which enables a user to interactively control ormanipulate the input being provided to a program, and view output of theprogram, while the program is executing.

A front panel is a type of GUI. A front panel may be associated with agraphical program as described above.

In an instrumentation application, the front panel can be analogized tothe front panel of an instrument. In an industrial automationapplication the front panel can be analogized to the MMI (Man MachineInterface) of a device. The user may adjust the controls on the frontpanel to affect the input and view the output on the respectiveindicators.

Graphical User Interface Element—an element of a graphical userinterface, such as for providing input or displaying output. Exemplarygraphical user interface elements comprise input controls and outputindicators.

Input Control—a graphical user interface element for providing userinput to a program. An input control displays the value input by theuser and is capable of being manipulated at the discretion of the user.Exemplary input controls comprise dials, knobs, sliders, input textboxes, etc.

Output Indicator—a graphical user interface element for displayingoutput from a program. Exemplary output indicators include charts,graphs, gauges, output text boxes, numeric displays, etc. An outputindicator is sometimes referred to as an “output control”.

Computer System—any of various types of computing or processing systems,including a personal computer system (PC), mainframe computer system,workstation, network appliance, Internet appliance, personal digitalassistant (PDA), television system, grid computing system, or otherdevice or combinations of devices. In general, the term “computersystem” can be broadly defined to encompass any device (or combinationof devices) having at least one processor that executes instructionsfrom a memory medium.

Measurement Device—includes instruments, data acquisition devices, smartsensors, and any of various types of devices that are configured toacquire and/or store data. A measurement device may also optionally befurther configured to analyze or process the acquired or stored data.Examples of a measurement device include an instrument, such as atraditional stand-alone “box” instrument, a computer-based instrument(instrument on a card) or external instrument, a data acquisition card,a device external to a computer that operates similarly to a dataacquisition card, a smart sensor, one or more DAQ or measurement cardsor modules in a chassis, an image acquisition device, such as an imageacquisition (or machine vision) card (also called a video capture board)or smart camera, a motion control device, a robot having machine vision,and other similar types of devices. Exemplary “stand-alone” instrumentsinclude oscilloscopes, multimeters, signal analyzers, arbitrary waveformgenerators, spectroscopes, and similar measurement, test, or automationinstruments.

A measurement device may be further configured to perform controlfunctions, e.g., in response to analysis of the acquired or stored data.For example, the measurement device may send a control signal to anexternal system, such as a motion control system or to a sensor, inresponse to particular data. A measurement device may also be configuredto perform automation functions, i.e., may receive and analyze data, andissue automation control signals in response.

Functional Unit (or Processing Element)—refers to various elements orcombinations of elements. Processing elements include, for example,circuits such as an ASIC (Application Specific Integrated Circuit),portions or circuits of individual processor cores, entire processorcores, individual processors, programmable hardware devices such as afield programmable gate array (FPGA), and/or larger portions of systemsthat include multiple processors, as well as any combinations thereof.

Automatically—refers to an action or operation performed by a computersystem (e.g., software executed by the computer system) or device (e.g.,circuitry, programmable hardware elements, ASICs, etc.), without userinput directly specifying or performing the action or operation. Thusthe term “automatically” is in contrast to an operation being manuallyperformed or specified by the user, where the user provides input todirectly perform the operation. An automatic procedure may be initiatedby input provided by the user, but the subsequent actions that areperformed “automatically” are not specified by the user, i.e., are notperformed “manually”, where the user specifies each action to perform.For example, a user filling out an electronic form by selecting eachfield and providing input specifying information (e.g., by typinginformation, selecting check boxes, radio selections, etc.) is fillingout the form manually, even though the computer system must update theform in response to the user actions. The form may be automaticallyfilled out by the computer system where the computer system (e.g.,software executing on the computer system) analyzes the fields of theform and fills in the form without any user input specifying the answersto the fields. As indicated above, the user may invoke the automaticfilling of the form, but is not involved in the actual filling of theform (e.g., the user is not manually specifying answers to fields butrather they are being automatically completed). The presentspecification provides various examples of operations beingautomatically performed in response to actions the user has taken.

Concurrent—refers to parallel execution or performance, where tasks,processes, or programs are performed in an at least partiallyoverlapping manner. For example, concurrency may be implemented using“strong” or strict parallelism, where tasks are performed (at leastpartially) in parallel on respective computational elements, or using“weak parallelism”, where the tasks are performed in an interleavedmanner, e.g., by time multiplexing of execution threads.

Logical Instrument—refers to a software implemented instrument thatprovides custom measurement and/or analysis functionality to extend orenhance the capability of utilized measurement hardware.

Measurement Engine—refers to an application programming interface (API)to hardware that a logical instrument uses to control or otherwiseaccess measurement hardware. Examples of measurement engines include,but are not limited to, device driver programs such as NI DAQmx(National Instruments data acquisition) and NI RFSA (NationalInstruments radio frequency signal analyzer) driver programs, amongothers.

Measurement Session—refers to a collection of state information, storedin hardware and/or in software, associated with a connection of alogical instrument to a physical measurement device.

Connection Session—refers to a collection of state information, storedin hardware and/or in software, associated with a connection of a clientapplication to an instance of a logical instrument.

System Session—refers to a collection of state information, stored inhardware and/or in software, associated with an instance of a logicalinstrument. A system session facilitates multiple clients interactingwith multiple instances of the same logical instrument.

Parser—refers to a component that analyzes a string containing one ormore instrumentation commands and corresponding parameters, receivedfrom a client application, e.g., via an instrument bus, and maps theinstrumentation commands and parameters to memory and actions of logicalinstruments.

Overview

Embodiments of the techniques disclosed herein may facilitate creationof a SCPI interface to a custom modular measurement system and mayprovide an associated run-time system that executes the functionsassociated with the SCPI commands, possibly concurrently.

FIG. 2A—Computer System

FIG. 2A illustrates a computer system 82 configured to implementembodiments of the present invention. As shown in FIG. 2A, the computersystem 82 may include a display device configured to display thegraphical program as the graphical program is created and/or executed.The display device may also be configured to display a graphical userinterface or front panel of the graphical program during execution ofthe graphical program. The graphical user interface may comprise anytype of graphical user interface, e.g., depending on the computingplatform. For example, in some embodiments, the graphical user interfacemay facilitate user specification and use of logical instruments, asdescribed herein.

The computer system 82 may include at least one memory medium on whichone or more computer programs or software components according to oneembodiment of the present invention may be stored. For example, thememory medium may store one or more graphical programs which areexecutable to implement or perform the methods described herein. In someembodiments, the memory medium may store software, e.g., one or moregraphical programs, that facilitates user specification and use oflogical instruments, as described herein.

Additionally, the memory medium may store a graphical programmingdevelopment environment application used to create and/or execute suchgraphical programs. The memory medium may also store operating systemsoftware, as well as other software for operation of the computersystem. Various embodiments further include receiving or storinginstructions and/or data implemented in accordance with the foregoingdescription upon a carrier medium.

FIG. 2B—Computer Network

FIG. 2B illustrates a system including a first computer system 82 thatis coupled to a second computer system 90. The computer system 82 may becoupled via a network 84 (or a computer bus) to the second computersystem 90. The computer systems 82 and 90 may each be any of varioustypes, as desired. The network 84 can also be any of various types,including a LAN (local area network), WAN (wide area network), theInternet, or an Intranet, among others. The computer systems 82 and 90may execute a program, e.g., a graphical program, in a distributedfashion. For example, computer 82 may execute a first portion of theblock diagram of a graphical program and computer system 90 may executea second portion of the block diagram of the graphical program. Asanother example, computer 82 may display the graphical user interface ofa graphical program and computer system 90 may execute the block diagramof the graphical program.

In one embodiment, the graphical user interface of the graphical programmay be displayed on a display device of the computer system 82, and theblock diagram may execute on a device coupled to the computer system 82.The device may include a programmable hardware element and/or mayinclude a processor and memory medium which may execute a real timeoperating system. In one embodiment, the graphical program may bedownloaded and executed on the device. For example, an applicationdevelopment environment with which the graphical program is associatedmay provide support for downloading a graphical program for execution onthe device in a real time system.

FIG. 2C—Distributed Measurement System

FIG. 2C illustrates a distributed measurement system configuredaccording to embodiments of the present invention. As may be seen, thisexemplary system includes a custom modular measurement (orinstrumentation) system, in this case, a PXI (PCI (Peripheral ComponentInterconnect) Extensions for Instrumentation) system, that includes achassis with multiple installed hardware devices (boards or modules) anda display. Note that while the instrumentation system shown utilizesPXI, any other instrumentation platforms may be used as desired. The PXIsystem is communicatively coupled to a client computer, e.g., a personalcomputer, although other types of suitably configured computer may beused as desired, e.g., a workstation, a laptop computer, a tabletcomputer, and so forth.

As indicated, in this particular exemplary embodiment, the clientcomputer and PXI system communicate via an VXI-11 instrumentationprotocol bus, although it should be noted that any other instrumentationprotocols may be used as desired, e.g., GPIB (General Purpose InterfaceBus) or HiSLIP (High Speed LAN (local area network) InstrumentProtocol), among others.

As FIG. 2C also shows, in this embodiment, the client computer includestest executive software, such as, for example, TestStand™ testingsoftware provided by National Instruments Corporation, the LabVIEW™graphical program development environment, also provided by NationalInstruments Corporation, and support for various programming languages,such as C, C#, Python, Ruby, and JavaScript, among others. As furtherindicated, in some embodiments, the client computer may also include orsupport virtual instrument related software, such as NI-VISA (NationalInstruments Virtual Instrument Software Architecture, which is astandard for configuring, programming, and troubleshootinginstrumentation systems comprising GPIB, VXI, PXI, Serial, Ethernet,and/or USB interfaces. As also shown, the client computer may alsoinclude a set of commands and responses, e.g., SCPI (Standard Commandsfor Programmable Instruments) commands and responses, although othercommand sets and protocols may be used as desired.

As also shown, in the embodiment of FIG. 2C, the PXI (or more generally,instrumentation) system includes a remote interface for logicalinstruments (RILI) system definition, e.g., in the form of user code andXML (eXtensible Markup Language), although other languages may be usedas desired. The instrumentation system also includes a RILI run-timesystem or engine, described in more detail below, as well as a LabVIEW™run-time system or engine, as provided by National Instruments. Itshould be noted, however, that the various specific protocols, systems,engines, languages, devices, and so forth, used in the examples anddescriptions presented herein, are exemplary only, and are not intendedto limit embodiments of the present techniques to any particularprotocols, systems, engines, languages, or devices.

Exemplary Systems

Embodiments of the present invention may be involved with performingtest and/or measurement functions; controlling and/or modelinginstrumentation or industrial automation hardware; modeling andsimulation functions, e.g., modeling or simulating a device or productbeing developed or tested, etc. Exemplary test applications where thegraphical program may be used include hardware-in-the-loop testing andrapid control prototyping, among others.

However, it is noted that embodiments of the present invention can beused for a plethora of applications and is not limited to the aboveapplications. In other words, applications discussed in the presentdescription are exemplary only, and embodiments of the present inventionmay be used in any of various types of systems. Thus, embodiments of thesystem and method of the present invention is configured to be used inany of various types of applications, including the control of othertypes of devices such as multimedia devices, video devices, audiodevices, telephony devices, Internet devices, etc., as well as generalpurpose software applications such as word processing, spreadsheets,network control, network monitoring, financial applications, games, etc.

FIG. 3A illustrates an exemplary instrumentation control system 100which may implement embodiments of the invention. The system 100comprises a host computer 82 which couples to one or more instruments.The host computer 82 may comprise a CPU, a display screen, memory, andone or more input devices such as a mouse or keyboard as shown. Thecomputer 82 may operate with the one or more instruments to analyze,measure or control a unit under test (UUT) or process 150, e.g., viaexecution of software 104.

The one or more instruments may include a GPIB instrument 112 andassociated GPIB interface card 122, a data acquisition board 114inserted into or otherwise coupled with chassis 124 with associatedsignal conditioning circuitry 126, a VXI instrument 116, a PXIinstrument 118, a video device or camera 132 and associated imageacquisition (or machine vision) card 134, a motion control device 136and associated motion control interface card 138, and/or one or morecomputer based instrument cards 142, among other types of devices. Thecomputer system may couple to and operate with one or more of theseinstruments. The instruments may be coupled to the unit under test (UUT)or process 150, or may be coupled to receive field signals, typicallygenerated by transducers. The system 100 may be used in a dataacquisition and control application, in a test and measurementapplication, an image processing or machine vision application, aprocess control application, a man-machine interface application, asimulation application, or a hardware-in-the-loop validationapplication, among others.

FIG. 3B illustrates an exemplary industrial automation system 200 whichmay implement embodiments of the invention. The industrial automationsystem 200 is similar to the instrumentation or test and measurementsystem 100 shown in FIG. 3A. Elements which are similar or identical toelements in FIG. 3A have the same reference numerals for convenience.The system 200 may comprise a computer 82 which couples to one or moredevices or instruments. The computer 82 may comprise a CPU, a displayscreen, memory, and one or more input devices such as a mouse orkeyboard as shown. The computer 82 may operate with the one or moredevices to perform an automation function with respect to a process ordevice 150, such as MMI (Man Machine Interface), SCADA (SupervisoryControl and Data Acquisition), portable or distributed data acquisition,process control, advanced analysis, or other control, among others,e.g., via execution of software 104.

The one or more devices may include a data acquisition board 114inserted into or otherwise coupled with chassis 124 with associatedsignal conditioning circuitry 126, a PXI instrument 118, a video device132 and associated image acquisition card 134, a motion control device136 and associated motion control interface card 138, a fieldbus device270 and associated fieldbus interface card 172, a PLC (ProgrammableLogic Controller) 176, a serial instrument 282 and associated serialinterface card 184, or a distributed data acquisition system, such asFieldpoint system 185, available from National Instruments Corporation,among other types of devices.

FIG. 4A is a high level block diagram of an exemplary system which mayexecute or utilize graphical programs. FIG. 4A illustrates a generalhigh-level block diagram of a generic control and/or simulation systemwhich comprises a controller 92 and a plant 94. The controller 92represents a control system/algorithm the user may be trying to develop.The plant 94 represents the system the user may be trying to control.For example, if the user is designing an ECU for a car, the controller92 is the ECU and the plant 94 is the car's engine (and possibly othercomponents such as transmission, brakes, and so on.) As shown, a usermay create a graphical program that specifies or implements thefunctionality of one or both of the controller 92 and the plant 94. Forexample, a control engineer may use a modeling and simulation tool tocreate a model (graphical program) of the plant 94 and/or to create thealgorithm (graphical program) for the controller 92.

FIG. 4B illustrates an exemplary system which may perform control and/orsimulation functions. As shown, the controller 92 may be implemented bya computer system 82 or other device (e.g., including a processor andmemory medium and/or including a programmable hardware element) thatexecutes or implements a graphical program. In a similar manner, theplant 94 may be implemented by a computer system or other device 144(e.g., including a processor and memory medium and/or including aprogrammable hardware element) that executes or implements a graphicalprogram, or may be implemented in or as a real physical system, e.g., acar engine.

In one embodiment of the invention, one or more graphical programs maybe created which are used in performing rapid control prototyping. RapidControl Prototyping (RCP) generally refers to the process by which auser develops a control algorithm and quickly executes that algorithm ona target controller connected to a real system. The user may develop thecontrol algorithm using a graphical program, and the graphical programmay execute on the controller 92, e.g., on a computer system or otherdevice. The computer system 82 may be a platform that supports real timeexecution, e.g., a device including a processor that executes a realtime operating system (RTOS), or a device including a programmablehardware element.

In one embodiment of the invention, one or more graphical programs maybe created which are used in performing Hardware in the Loop (HIL)simulation. Hardware in the Loop (HIL) refers to the execution of theplant model 94 in real time to test operation of a real controller 92.For example, once the controller 92 has been designed, it may beexpensive and complicated to actually test the controller 92 thoroughlyin a real plant, e.g., a real car. Thus, the plant model (implemented bya graphical program) is executed in real time to make the realcontroller 92 “believe” or operate as if it is connected to a realplant, e.g., a real engine.

In the embodiments of FIGS. 3A, 3B, and 4B above, one or more of thevarious devices may couple to each other over a network, such as theInternet. In one embodiment, the user operates to select a target devicefrom a plurality of possible target devices for programming orconfiguration using a graphical program. Thus the user may create agraphical program on a computer and use (execute) the graphical programon that computer or deploy the graphical program to a target device (forremote execution on the target device) that is remotely located from thecomputer and coupled to the computer through a network.

Graphical software programs which perform data acquisition, analysisand/or presentation, e.g., for measurement, instrumentation control,industrial automation, modeling, or simulation, such as in theapplications shown in FIGS. 3A and 3B, may be referred to as virtualinstruments.

FIG. 5—Computer System Block Diagram

FIG. 5 is a block diagram 12 representing one embodiment of the computersystem 82 and/or 90 illustrated in FIGS. 2A, 2B, 2C, or computer system82 shown in FIG. 3A or 3B. It is noted that any type of computer systemconfiguration or architecture can be used as desired, and FIG. 5illustrates a representative PC embodiment. It is also noted that thecomputer system may be a general purpose computer system, a computerimplemented on a card installed in a chassis, or other types ofembodiments. Elements of a computer not necessary to understand thepresent description have been omitted for simplicity.

The computer may include at least one central processing unit or CPU(processor) 160 which is coupled to a processor or host bus 162. The CPU160 may be any of various types, including an x86 processor, e.g., aPentium class, a PowerPC processor, a CPU from the SPARC family of RISCprocessors, as well as others. A memory medium, typically comprising RAMand referred to as main memory, 166 is coupled to the host bus 162 bymeans of memory controller 164. The main memory 166 may store programs,e.g., graphical programs, implementing embodiments of the presenttechniques. The main memory may also store operating system software, aswell as other software for operation of the computer system.

The host bus 162 may be coupled to an expansion or input/output bus 170by means of a bus controller 168 or bus bridge logic. The expansion bus170 may be the PCI (Peripheral Component Interconnect) expansion bus,although other bus types can be used. The expansion bus 170 includesslots for various devices such as described above. The computer 82further comprises a video display subsystem 180 and hard drive 182coupled to the expansion bus 170. The computer 82 may also comprise aGPIB card 122 coupled to a GPIB bus 112, and/or an MXI device 186coupled to a VXI chassis 116.

As shown, a device 190 may also be connected to the computer. The device190 may include a processor and memory which may execute a real timeoperating system. The device 190 may also or instead comprise aprogrammable hardware element. The computer system may be configured todeploy a graphical program to the device 190 for execution of thegraphical program on the device 190. The deployed graphical program maytake the form of graphical program instructions or data structures thatdirectly represents the graphical program. Alternatively, the deployedgraphical program may take the form of text code (e.g., C code)generated from the graphical program. As another example, the deployedgraphical program may take the form of compiled code generated fromeither the graphical program or from text code that in turn wasgenerated from the graphical program.

FIG. 6—Flowchart of a Method for Interfacing with Logical Instruments

FIG. 6 illustrates a method for interfacing with logical instruments,according to one embodiment. The method shown in FIG. 6 may be used inconjunction with any of the computer systems or devices shown in theabove Figures, among other devices. In various embodiments, some of themethod elements shown may be performed concurrently, in a differentorder than shown, or may be omitted. Additional method elements may alsobe performed as desired. As shown, this method may operate as follows.

In 602, user input specifying one or more system definitions may bereceived by an editor, e.g., an editor program executing on a computer,such as a computer system 82 or 90, or a client computer as shown inFIG. 2C. Each system definition may map message based commands,parameters, variables and/or metadata accordant with a control protocolfor standalone instruments to functions and data in a programminglanguage, e.g., the “G” graphical programming language of LabVIEW™, orany other programming language desired. Note that as used herein theterm “standalone instrument” refers to a traditional standalone hardwaredevice, such as an oscilloscope, signal analyzer, etc. Thus, each systemdefinition may map message based standalone instrument communications(commands, parameters, variables, and/or metadata) to function calls ina programming language.

In 604, the one or more system definitions may be generated by theeditor, based on the user input of 602. Each system definition may beuseable by a client application to interface with a custom modularmeasurement system that includes multiple logical instruments via themessage based commands, parameters, variable, and/or metadata. Saidanother way, a client application may utilize message based standaloneinstrument communications (the message based commands, parameters,variables, and/or metadata) to interact with logical instruments of thecustom modular measurement system via the mappings provided by the oneor more of the system definitions. As noted above in the Terms section,a logical instrument is a software implemented instrument that providescustom measurement and/or analysis functionality to extend or enhancethe capability of utilized measurement hardware. Logical instrumentsimplemented on an embedded device may be referred to as embedded logicalinstruments.

FIG. 7 illustrates an exemplary edit time work flow, according to oneembodiment. As shown, a system designer (user of the editor of 602) mayspecify or generate command set specifications (as per 602), in thisparticular case, SCPI (Standard Commands for Programmable Instruments)command set specifications, via input to a RILI (remote interface forlogical instruments) system editor, although it should be noted thatthis name is used for convenience and informative purposes only, andthat any other name may be used as desired. More generally, the namesand labels used herein are exemplary only, and are not intended to limitthe embodiments to any particular form, function, or appearance. As FIG.7 also shows, the editor (RILI system editor) may then generate at leastone system definition, in this exemplary case, at least one RILI systemdefinition in XML, although any other language or format may be used asdesired. As indicated, in some embodiments, the editor may also generatecommand programs, e.g., in response to input from the system designer.In the exemplary embodiment of FIG. 7, the command programs are SCPIcommand VIs (virtual instruments, e.g., graphical programs). Thesecommand programs may implement functionality corresponding to associatedcommands, i.e., may be executable to perform functions in response torespective commands. Accordingly, in some embodiments, the controlprotocol for standalone instruments may be or include SCPI (StandardCommands for Programmable Instruments).

Thus, in some embodiments, the method may include displaying andediting, by the editor, one or more functions in the programminglanguage. In various embodiments, the programming language may be of anytype desired. For example, in one embodiment, the programming languagemay be textual, e.g., C, C++, C#, JAVA, etc., while in otherembodiments, the programming language may be or include a graphicalprogramming language. In one embodiment, the graphical programminglanguage may be a graphical data flow programming language. For example,the editor may be part of a graphical program development environment,such as LabVIEW™, whereby the user may develop functions in the LabVIEW™graphical programming language (“G”).

Similarly, in some embodiments, the method may include displaying andediting, by the editor, at least one of the system definitions inresponse to user input. Turning now to FIG. 8, an exemplary hierarchicalcommand set definition, according to one embodiment, is presented. Thehierarchical command set definition may be displayed by the editor in aGUI, via which the system designer may create and edit such definitions.For example, in one embodiment, a tree of the message based commandsorganized in accordance with the logical instruments and measurementsubsystems of the logical instruments may be created by the editor inresponse to input, as illustrated in FIG. 8.

As with FIG. 7, this exemplary embodiment is based on SCPI. Asindicated, at the top level of the hierarchy is the RILI systemdesignation, under which follows a defined RILI instrument(Instrument 1) with component folders: “Mandatory” and “niWLAN”, whichinclude necessary (mandatory) definitions for the instrument, and a“RILI personality” or profile definition with network related aspects,respectively. Each of these specification components may includesubcomponents. For example, as shown, the niWLAN RILI personality mayinclude definition folders, e.g., “CONfigure”, “FETCH”,“NIWLAN-INTERNAL”, “SYSTem”, and “TRIGger”, defining respective commandsor aspects of the RILI personality, although these particular names areexemplary only. Further illustrating the hierarchical nature of thesystem definition, the trigger related personality definition (folder)“TRIGger” includes subfolder “RFSA” (radio frequency signal analyzer)with subfolder “WLAN<i>” that defines an instrument command: “DELay”,specifically, an instrument command parameter definition: TriggerDelay,and an “EDGE” definition that specifies which edge of a trigger signalis used as a trigger. Note that the hierarchical command set definitionof FIG. 7 is exemplary only, and that the hierarchy and particularcomponents shown are for illustrative purposes.

Thus, the at least one system definition may specify or define a commandset for interacting with logical instruments implemented in the custommodular measurement system. Moreover, the system designer may also atleast partially specify or define logical instruments for the custommodular measurement system, e.g., via user code (e.g., command programsor VIs). Note that in various embodiments, each logical instrument mayrepresent one or more of: a single physical measurement device (e.g.,physical module or card), multiple coordinated physical measurementdevices, or software, e.g., an instrument program.

In one embodiment, an integrated instrument soft front panel may becreated by the editor, e.g., in response to user input, and/or based onthe at least one system definition. The integrated instrument soft frontpanel may include respective subpanels for logical instruments and/ormeasurement subsystems of the logical instruments, and may map elementson the panels to the functions, parameters, variables, and/or metadatain the programming language. Thus, a GUI for the defined system may begenerated by the editor. In some embodiments, the GUI may be created inaccordance with the Soft Front Panel (SFP) protocol or system providedby National Instruments Corporation.

In some embodiments, the editor may create variables scoped intoisolated groups for storing data accessible from command functions,e.g., from the SCPI command functions. This scope partitioning ofvariables may prevent memory collisions or conflicts during operation ofthe logical instruments.

Method elements 606-612 describe exemplary run-time related operationsof the present techniques.

In 606, at least one of the system definitions may be deployed onto thecustom modular measurement system (see, e.g., the PXI system of FIG.2C). In some embodiments, multiple such system definitions may bedeployed onto the custom modular measurement system. Once this (at leastone) system definition is deployed to the custom modular measurementsystem, the system may be operational, assuming that the system isalready configured appropriately with the necessary run-time components,e.g., a run-time engine, e.g., a RILI run-time engine, etc.

FIG. 9 illustrates an exemplary run time work flow, according to oneembodiment. As may be seen, a system designer, possibly the same systemdesigner of 602, may specify (or update) a runtime configuration for thecustom modular measurement system, e.g., a RILI runtime configuration,e.g., via user input to a GUI, and may initiate a runtime service forthe custom modular measurement system, e.g., a RILI runtime service.This runtime service may then load the at least one system definition(606), thereby configuring the runtime service, e.g., with specifiedconnection sessions, (logical) instruments, and personalities (orprofiles). At this point, the custom modular measurement system may beready for operation.

In 608, a message based command from the client application may beaccepted by a run-time engine of the custom modular measurement system(e.g., the RILI run-time engine—again, see the PXI system of FIG. 2C).For example, referring again to the exemplary system of FIG. 2C, themessage based command may be sent from the client computer based on aclient application executing on the client computer, and may betransmitted in accordance with a specified instrumentation protocol,such as VXI-11.

In 610, a function that corresponds to the message based command may becalled by the run-time engine, based on the at least one of the one ormore system definitions. In other words, the method may use the at leastone system definition to convert or translate the message based commandinto a function call by the run-time engine.

In 612, the accepting (608) and calling (610) may be performed by therun-time engine a plurality of times, where at least one called functioninvokes operation of at least one of the logical instruments. Saidanother way, method elements 608 and 610 may be repeated one or moretimes in an iterative manner, mapping the accepted message basedcommands to functions that are called by the run-time engine, where atleast one of the functions utilizes at least one of the logicalinstruments. In some embodiments, the method may further include sendinga message containing a result of the operation to the clientapplication. In other words, once the at least one of the logicalinstruments is invoked, the method may send a message that includesresults of the logical instrument's operation, e.g., to another systemor process, to a log file, to a user, etc.

In some embodiments, the message based command may be parsed by therun-time engine, and the (corresponding) function may be determinedbased on the parsing. The function call of 610 may be performed inresponse to this determining.

In one embodiment, the method may further include synchronizing, by therun-time engine, access to a physical measurement device by multiplelogical instruments, or multiple measurement subsystems within a logicalinstrument. In this manner, operations or functions performed bymultiple logical instruments or measurement subsystems thereof may becoordinated to perform a higher level collective task, i.e., to achievesome collective functionality.

Exemplary System Architectures

FIGS. 10 and 11 illustrate exemplary system designs and architectures,according to some embodiments. Note, however, that the particulardesigns and architectures shown and described are exemplary only. Thesystem may be implemented via any of the devices shown in the Figuresdescribed above, and may thus include a processor and a memory coupledto the processor, where the memory stores program instructionsexecutable to implement a plurality of logical instruments, where eachlogical instrument is configured to perform measurement functions via atleast one corresponding physical measurement device. The programinstructions may be further executable to implement a plurality ofisolated memory spaces in the memory, where each isolated memory spaceis configured to store configuration information and working data for arespective logical instrument, and may further be executable toimplement at least one measurement engine.

Per the Terms section above, a measurement engine is an applicationprogramming interface (API) to hardware that the logical instrument usesto control or otherwise access measurement hardware. Examples ofmeasurement engines include, but are not limited to, device driverprograms such as NI DAQmx (National Instruments data acquisitionmulti-function software services) and NI RFSA (National Instrumentsradio frequency signal analyzer) driver programs, among others. In someembodiments, the system may include a plurality of measurement engines.Moreover, the plurality of measurement engines may be configured tooperate concurrently, as discussed below in more detail.

The plurality of logical instruments may be configured to operateconcurrently. For example, each of the plurality of logical instrumentsmay be configured to: communicate with a respective client applicationindependently, and acquire, generate, or process data using the at leastone corresponding physical measurement device via the at least onemeasurement engine per the configuration information. Moreover, as notedabove, during operation, at least two of the logical instruments mayshare use of a single physical measurement device.

FIG. 10 is a high level block diagram of an exemplary system of logicalinstruments, according to one embodiment. As FIG. 10 illustrates, thesystem of logical instruments may include multiple connection sessions,each connection session facilitating interaction of a respective client(application), e.g., Client A and Client B of FIG. 10, with a respectivelogical instrument, as presented below each connection session. As usedherein, the term “connection session” is a collection of stateinformation, stored in hardware and/or in software, associated with aconnection of a client application to an instance of a logicalinstrument.

As FIG. 10 shows, in one embodiment, each logical instrument may includeuser code, e.g., one or more programs implementing functionality of thelogical instrument, and respective memory, including configurationmemory for storing configuration data, and working memory for use by thelogical instrument (user code) in performing functions. As noted above,the system may also include a measurement engine, also shown in FIG. 10,which may include one or more device driver programs for interactingwith hardware, also shown, where the hardware includes at least onephysical measurement device, and in some embodiments, multiple suchdevices. As further indicated in FIG. 10, in some embodiments, themeasurement engine may include or support multiple measurement sessions.A measurement session is or includes a collection of state information,stored in hardware and/or in software, associated with a connection of alogical instrument to a physical measurement device. Thus, the systemmay be configured to implement and manage interactions between multiplelogical instruments and associated physical measurement devicesindependently, based on these measurement sessions.

Moreover, in some embodiments, the plurality of logical instruments maybe configured to operate concurrently. For example, each of theplurality of logical instruments may be configured to communicate with arespective client application independently, and acquire, generate, orprocess data using the at least one corresponding physical measurementdevice via the at least one measurement engine per the configurationinformation. During operation, at least two of the logical instrumentsmay share use of a single physical measurement device, as discussed inmore detail below.

FIG. 11 illustrates an exemplary internal architecture of an exemplarysystem of logical instruments and shared hardware, according to oneembodiment. More specifically, FIG. 11 describes a more detailed(exemplary) embodiment of the system of FIG. 10.

As shown, in the exemplary embodiment of FIG. 11, a client computer iscoupled to a custom modular measurement device that includes multiplelogical instruments and corresponding physical measurement devices, inthis exemplary case, PXIe modules or boards (labeled “PXIe-Physical”),comprised in a chassis, e.g., as illustrated in FIG. 2C.

The client computer of FIG. 11 includes a test application (Test:App),that includes at least one method, where the method includes or utilizesone or more SCPI commands and corresponding VISA calls, which maycommunicate with the controller via an instrumentation bus protocol,e.g., VXI-11, as shown. In other words, the client application mayexecute on the client computer, and may invoke one or more methods(e.g., program functions) that send SCPI commands via VISA calls (e.g.,in the form of messages) to the controller (or, more generally, thecustom modular measurement system).

As FIG. 11 further illustrates, the system may implement multiple systemsessions, where each system session is a collection of stateinformation, stored in hardware and/or in software, associated with aninstance of a logical instrument. A system session facilitates multipleclients interacting with multiple instances of the same logicalinstrument. Each system session may include or support a respectiveconnection session, logical instrument, and physical measurement device,as shown.

In one embodiment, each connection session may include a parser, whichis a component that analyzes a string containing one or moreinstrumentation commands and corresponding parameters, received from aclient application, e.g., via an instrument bus, and maps theinstrumentation commands and parameters to memory and actions of logicalinstruments. Each connection session may include an instrumentation busprotocol engine for communicating with the client computer via theinstrument bus protocol, e.g., VXI-11, among others.

Each connection session may be configured to communicate with arespective logical instrument, specifically, the respective memory anduser code of the logical instrument, which in turn, may communicate withrespective hardware, e.g., with a respective physical measurementdevice, such as a measurement module or board. In some embodiments, atleast one logical instrument of the plurality of logical instruments maybe configured to provide measurement capabilities, and analysisfunctionality implemented in software, where the analysis functionalityoperates on data obtained from the at least one corresponding physicalmeasurement device.

Further Exemplary Embodiments

The following describes further exemplary embodiments of the abovetechniques.

In one embodiment, during operation, at least two of the logicalinstruments share use of a single physical measurement device. In otherwords, multiple logical instruments may utilize the same physicalmeasurement device to perform their respective functions or tasks. Forexample, in one embodiment, use of a single physical measurement deviceby a logical instrument may include operating the single physicalmeasurement device in a plurality of phases, including at least onephase that includes a portion that requires exclusive access to thesingle physical measurement device (i.e., an exclusive portion), whichmay be referred to as an exclusive portion of the phase. Accordingly, toshare use of the single physical measurement device, each logicalinstrument may configured to lock the single physical measurement devicefor duration of the exclusive portion of the at least one phase, therebyblocking other logical instruments from using the single physicalmeasurement device for the duration of the exclusive portion of the atleast one phase, and unlock the single physical measurement device whenthe exclusive portion of the at least one phase completes, therebyallowing use of the single physical measurement device by the otherlogical instruments. For brevity, the “exclusive portion of the at leastone phase” may be referred to herein as simply the “exclusive portion”.

For example, in one embodiment, the exclusive portion may be or includean acquire portion of a measure phase, in which data are acquired viathe corresponding single physical measurement device. In anotherembodiment, the exclusive portion may be or include a generate portionof a measure phase, in which signals are generated via the correspondingsingle physical measurement device. Note that the particular phase andportion names used herein are exemplary only, and that any other namesmay be used as desired.

FIG. 12 illustrates exemplary sharing of a physical instrument viatimelines, according to one embodiment. In this case, the singlephysical measurement device is a DAQ device. As indicated, Client A(e.g., a first client application) may invoke a measurement function oroperation that uses a shared physical measurement device in multiplephases, including a configure phase, a measure phase, which includes anacquire phase and a process phase, and finally, a readback phase. Inthis exemplary case, the exclusive portion of the at least one phase(which requires exclusive access to the single physical measurementdevice) is the acquire portion of the measure phase, in which the singlephysical measurement device acquires data. Client B (e.g., a secondclient application) make be configured to use the same device to acquirerespective data.

As shown, the single physical measurement device, i.e., the sharedinstrument, may be locked for use by Client A during the acquire portionof the measure phase (of Client A), as indicated by the notation “HoldShared Instrument Lock”, during which time, Client B's access to thesingle physical measurement device (shared instrument) may be blocked,as indicated. Thus, Client B may be required to wait until Client A'sacquire portion of the measure phase is complete before beginning itsown acquire portion of the measure phase, as indicated by the notation“Wait on Shared Instrument Lock”.

Once the acquire portion of the measure phase of Client A is complete,the single physical measurement device, i.e., the shared instrument, maybe locked for use by Client B for the duration of the acquire portion ofthe measure phase of Client B, as indicated by the notation “Hold SharedInstrument Lock” below the Client B timeline, during which time, ClientB's access to the single physical measurement device (shared instrument)may be blocked, as indicated. Thus, Client A may be excluded fromaccessing the device until Client B's acquire portion of the measurephase is complete. Thus, each client may be excluded from accessing thesingle physical measurement device for a minimum duration, specifically,for the minimum amount of time required by the exclusive portion of thecorresponding phase of the device's operation.

In some embodiments, each logical instrument may be configured to lockand unlock the single physical measurement device via a mechanismimplemented in the at least one measurement engine. For example, themechanism may be implemented in the at least one measurement engineusing operating system (OS) features, e.g., using one or moresemaphores, and/or at least one mutex. In some embodiments, themechanism may be implemented by putting threads to sleep or disabling OSinterrupts. In one embodiment, the mechanism may be implemented in theat least one measurement engine using virtual instrument softwarearchitecture (VISA) locks.

FIG. 13—Flowchart of a Method for Operating Logical Instruments

FIG. 13 illustrates a method for operating logical instruments,according to one embodiment of the techniques disclosed herein. Themethod shown in FIG. 13 may be used in conjunction with any of thecomputer systems or devices shown in the above Figures, among otherdevices. In various embodiments, some of the method elements shown maybe performed concurrently, in a different order than shown, or may beomitted. Additional method elements may also be performed as desired. Asshown, this method may operate as follows.

In 1302, a custom modular measurement system may be configured, e.g.,using a computer, such as a computer system 82. The custom modularmeasurement system may include a plurality of logical instruments, whereeach logical instrument is configured to perform measurement functionsvia at least one corresponding physical measurement device, and furtherincludes a plurality of isolated memory spaces in the memory, where eachisolated memory space is configured to store configuration informationand working data for a respective logical instrument, and at least onemeasurement engine.

Additionally, in some embodiments, the method may further includeoperating the custom modular measurement system, including operating theplurality of logical instruments concurrently, as indicated in 1304. Asalso indicated, in some embodiments, this concurrent operation of thelogical instruments may include method elements 1312 and 1314. Morespecifically, each logical instrument of the plurality of logicalinstruments may communicate with a respective client applicationindependently, as per 1312, and may acquire, generate, or process datausing the at least one corresponding physical measurement device via theat least one measurement engine per the configuration information, asindicated in 1314. Moreover, as further indicated in 1304, operating theplurality of logical instruments concurrently may include sharing use ofa single physical measurement device by at least two of the logicalinstruments, as discussed above.

In some embodiments, at least one logical instrument may supportconcurrent execution of multiple independent measurement subsystems.Thus, for example, a single logical instrument may concurrently performtwo complete different and separate measurements. As another example, ifa logical instrument includes or supports a measurement system thatincludes data acquisition functionality via a first measurementsubsystem, as well as analysis functionality via a second measurementsubsystem, the logical instrument may support concurrent execution ofthe first and second measurement subsystems, e.g., thereby acquiringdata and analyzing the acquired data in concurrent fashion.

In some embodiments, the run-time engine may support multiple concurrentexternal connections to the same logical instrument. Thus, for example,multiple different client applications or client computers may utilizethe same logical instrument, subject to constraints due to exclusiveportions of phases associated therewith, as described above.

Thus, embodiments of the above-described techniques may implement amechanism to export an interface to logical instruments that can beinvoked over a network. Moreover, embodiments of the present techniquesmay facilitate creation of an interface, e.g., a SCPI interface, to acustom modular measurement system, and may provide an associated runtimesystem that executes functions associated with the commands, possiblyconcurrently.

Additionally, embodiments of the logical instruments disclosed hereinmay provide for efficient and cost-effective measurement systems andoperations as compared to functionally comparable suites of standaloneinstruments. For example, by separating logical instruments from thephysical hardware they use, the hardware needs to be locked only duringthe actual exclusive (e.g., acquire or generate) portion of a phase,which means that the only operations that multiple clients cannotperform simultaneously are those performed during the exclusive portion(of the measure phase) of the operation. Embedding such hardwareresource management within a shared logical instrument providessubstantially more flexibility than prior art approaches.

Summarizing the above, embodiments of the embedded shared logicalinstruments and related techniques disclosed herein may provide forisolation of clients by providing different connection sessions for eachclient, may support a virtually unlimited number of logical instrumentinstances all running on the same physical hardware, may provideisolated memory spaces wherein different clients' configuration valuesmay be stored, one or more measurement engine, with multiple parallelmeasurement sessions, and in some embodiments, a resource manager, e.g.,included in the measurement engine, that implements the above-describedlocking and unlocking.

Creation of a Graphical Program

The following describes exemplary creation of a graphical program,although it should be noted that the techniques described are exemplaryonly, and that other approaches to creating graphical programs may beused as desired.

First, a graphical program may be created on the computer system 82 (oron a different computer system). The graphical program may be created orassembled by the user arranging on a display a plurality of nodes oricons and then interconnecting the nodes to create the graphicalprogram. In response to the user assembling the graphical program, datastructures may be created and stored which represent the graphicalprogram. The nodes may be interconnected in one or more of a data flow,control flow, or execution flow format. The graphical program may thuscomprise a plurality of interconnected nodes or icons which visuallyindicates the functionality of the program. As noted above, thegraphical program may comprise a block diagram and may also include auser interface portion or front panel portion. Where the graphicalprogram includes a user interface portion, the user may optionallyassemble the user interface on the display. As one example, the user mayuse the LabVIEW graphical programming development environment to createthe graphical program.

In an alternate embodiment, the graphical program may be created by theuser creating or specifying a prototype, followed by automatic orprogrammatic creation of the graphical program from the prototype. Thisfunctionality is described in U.S. patent application Ser. No.09/587,682 titled “System and Method for Automatically Generating aGraphical Program to Perform an Image Processing Algorithm”, which ishereby incorporated by reference in its entirety as though fully andcompletely set forth herein. The graphical program may be created inother manners, either by the user or programmatically, as desired. Thegraphical program may implement a measurement function that is desiredto be performed by the instrument.

In another approach, a graphical user interface or front panel for thegraphical program may be created, e.g., in response to user input. Thegraphical user interface may be created in any of various ways, e.g.,depending on the graphical programming development environment used.

A block diagram for the graphical program may be created. The blockdiagram may be created in or using any graphical programming developmentenvironment, such as LabVIEW, Simulink, VEE, or another graphicalprogramming development environment. The block diagram may be created inresponse to direct user input, e.g., the user may create the blockdiagram by placing or “dragging and dropping” icons or nodes on thedisplay and interconnecting the nodes in a desired fashion.Alternatively, the block diagram may be programmatically created from aprogram specification. The plurality of nodes in the block diagram maybe interconnected to visually indicate functionality of the graphicalprogram. The block diagram may have one or more of data flow, controlflow, and/or execution flow representations.

It is noted that the graphical user interface and the block diagram maybe created separately or together, in various orders, or in aninterleaved manner. In one embodiment, the user interface elements inthe graphical user interface or front panel may be specified or created,and terminals corresponding to the user interface elements may appear inthe block diagram in response. For example, when the user places userinterface elements in the graphical user interface or front panel,corresponding terminals may appear in the block diagram as nodes thatmay be connected to other nodes in the block diagram, e.g., to provideinput to and/or display output from other nodes in the block diagram. Inanother embodiment, the user interface elements may be created inresponse to the block diagram. For example, the user may create theblock diagram, wherein the block diagram includes terminal icons ornodes that indicate respective user interface elements. The graphicaluser interface or front panel may then be automatically (or manually)created based on the terminal icons or nodes in the block diagram. Asanother example, the graphical user interface elements may be comprisedin the diagram.

Although the embodiments above have been described in considerabledetail, numerous variations and modifications will become apparent tothose skilled in the art once the above disclosure is fully appreciated.It is intended that the following claims be interpreted to embrace allsuch variations and modifications.

We claim:
 1. A method for controlling a custom modular measurement system, comprising: receiving, by an editor, user input specifying one or more system definitions, wherein each system definition maps message based commands, parameters, variables and/or metadata accordant with a control protocol for standalone instruments to functions and data in a programming language; generating, by the editor, the one or more system definitions based on the user input, wherein each system definition is used by a client application to interface with a custom modular measurement system that includes multiple logical instruments via the message based commands, parameters, variables, and/or metadata, each logical instrument providing custom measurement or analysis functionality for at least one physical measurement device; deploying at least one of the system definitions onto the custom modular measurement system; accepting, by a run-time engine of the custom modular measurement system, a message based command from the client application; calling, by the run-time engine, a function that corresponds to the message based command, based on the at least one of the one or more system definitions; and performing, by the run-time engine, said accepting and said calling a plurality of times, wherein at least one called function invokes operation of at least one of the logical instruments, wherein each of the multiple logical instruments is configured to lock the measurement device during an exclusive phase of operation of the measurement device, the exclusive phase including an acquire portion of a measure phase, wherein during the measure phase, data are acquired via the measurement device.
 2. The method of claim 1, further comprising: displaying and editing, by the editor, one or more functions in the programming language.
 3. The method of claim 1, further comprising: displaying and editing, by the editor, at least one of the system definitions in response to the user input.
 4. The method of claim 1, further comprising: creating, by the editor, a tree of the message based commands organized in accordance with the logical instruments and measurement subsystems of the logical instruments.
 5. The method of claim 1, further comprising: creating, by the editor, an integrated instrument soft front panel, wherein the integrated instrument soft front panel includes respective subpanels for logical instruments and/or measurement subsystems of the logical instruments, and wherein the integrated instrument soft front panel maps elements on the panels to the functions, parameters, variables, and/or metadata in the programming language.
 6. The method of claim 1, further comprising: parsing, by the run-time engine, the message based command; and determining the function based on said parsing; wherein said calling is performed in response to said determining.
 7. The method of claim 1, wherein each logical instrument represents: a single physical measurement device; multiple coordinated physical measurement devices; or software.
 8. The method of claim 1, wherein during operation, at least two of the logical instruments share use of a single physical measurement device.
 9. The method of claim 1, wherein at least one logical instrument supports concurrent execution of multiple independent measurement subsystems.
 10. The method of claim 1, wherein the run-time engine supports multiple concurrent external connections to a same logical instrument.
 11. The method of claim 1, further comprising: synchronizing, by the run-time engine, access to the physical measurement device by: multiple logical instruments; or multiple measurement subsystems within a logical instrument.
 12. The method of claim 1, further comprising: sending a message containing a result of the operation to the client application.
 13. The method of claim 1, wherein the control protocol for standalone instruments comprises SCPI (Standard Commands for Programmable Instruments).
 14. The method of claim 1, wherein the programming language comprises a graphical programming language.
 15. The method of claim 1, wherein the graphical programming language comprises a graphical data flow programming language.
 16. The method of claim 1, wherein each of the plurality of logical instruments is further configured to unlock the measurement device when the exclusive phase of the operation of the measurement device completes.
 17. A non-transitory computer readable memory medium that stores program instructions that are executable to implement: an editor, configured to: receive user input specifying one or more system definitions, wherein each system definition maps message based commands, parameters, variables, and/or metadata accordant with a control protocol for standalone instruments to functions and data in a programming language; generate the one or more system definitions based on the user input; wherein each system definition is used by a client application to interface with a custom modular measurement system that includes multiple logical instruments via the message based commands, parameters, variables, and/or metadata, each logical instrument providing custom measurement or analysis functionality for at least one physical measurement device; deploy at least one of the system definitions onto the custom modular measurement system; accepting, by a run-time engine of the custom modular measurement system, a message based command from the client application; call, by the run-time engine, a function that corresponds to the message based command, based on the at least one of the one or more system definitions; and perform, by the run-time engine, said accepting and said calling a plurality of times, wherein at least one called function invokes operation of at least one of the logical instruments, wherein each of the multiple logical instruments is configured to lock the measurement device during an exclusive phase of operation of the measurement device, the exclusive phase including an acquire portion of a measure phase, wherein during the measure phase, data are acquired via the measurement device.
 18. The non-transitory computer readable memory medium of claim 17, wherein the editor is configured to: display and edit one or more functions in the programming language.
 19. The non-transitory computer readable memory medium of claim 17, wherein the editor is further configured to: display and edit at least one of the system definitions in response to user input.
 20. The non-transitory computer readable memory medium of claim 17, wherein the editor is further configured to: create a tree of the message based commands organized in accordance with the logical instruments and measurement subsystems of the logical instruments.
 21. The non-transitory computer readable memory medium of claim 17, wherein the editor is further configured to: create an integrated instrument soft front panel, wherein the integrated instrument soft front panel includes respective subpanels for logical instruments and/or measurement subsystems of the logical instruments, and wherein the integrated instrument soft front panel maps elements on the subpanels to the functions, parameters, variables, and/or metadata in the programming language.
 22. The non-transitory computer readable memory medium of claim 21, wherein the run-time engine is further configured to: send a message containing a result of the operation to the client application.
 23. The method of claim 21, wherein during operation, at least two of the logical instruments share use of a single physical measurement device.
 24. A system, comprising: a client application; and a custom modular measurement system, coupled to the client application, wherein the custom modular measurement system comprises: a controller, comprising: one or more system definitions, wherein each system definition maps message based commands, parameters, variables, and/or metadata accordant with a control protocol for standalone instruments to functions and data in a programming language; and a run-time engine; and a plurality of logical instruments, coupled to or comprised in the controller, each logical instrument providing custom measurement or analysis functionality for at least one physical measurement device; wherein the client application is configured to receive, via an editor of the client application, user input specifying the one or more system definitions, and wherein the client application is further configured to send one or more message based commands, parameters, variables, and/or metadata accordant with the control protocol to the custom modular measurement system; and wherein the run-time engine is configured to: accept a message based command from the client application; call a function that corresponds to the message based command, based on at least one of the one or more system definitions; and perform said accepting and said calling a plurality of times, wherein at least one called function invokes operation of at least one of the logical instruments, wherein each of the multiple logical instruments is configured to lock the measurement device during an exclusive phase of operation of the measurement device, the exclusive phase including an acquire portion of a measure phase, wherein during the measure phase, data are acquired via the measurement device. 